package com.wangsh.usersCenter.users.pojo;

import java.util.Date;
import java.util.Map;
import java.util.TreeMap;

import com.wangsh.usersCenter.common.pojo.BasePojo;

/**
 * 用户扩展信息表
 * 
 * @author Wangsh
 */
public class AUsersExtend extends BasePojo<AUsersExtend>
{
	private int id;
	private int usersId;
	private byte idCardType;
	private String idCardHeadImg;
	private String idCardBackImg;
	private String sendEmailCode;
	private Date sendEmailTime;
	private String sendPhoneCode;
	private Date sendPhoneTime;
	private Date createTime;
	private Date updateTime;
	
	/*--字符串表示--*/
	private String idCardTypeStr ; 
	/* 存储所有状态的容器 */
	private Map<String,String> enumsMap = new TreeMap<String, String>();
	
	/**
	 * 	存储所有状态的容器
	 * @return
	 */
	public Map<String, String> getEnumsMap()
	{
		// 根据状态值获取字符串描述
		AUsersExtendEnum[] usersExtendEnums = AUsersExtendEnum.values();
		for (int i = 0; i < usersExtendEnums.length; i++)
		{
			AUsersExtendEnum usersExtendEnum = usersExtendEnums[i];
			String key = usersExtendEnum.toString() ; 
			enumsMap.put(key + "-" + usersExtendEnum.getStatus() + "", usersExtendEnum.getName());
		}
		return enumsMap;
	}
	
	public String getIdCardTypeStr()
	{
		// 根据状态值获取字符串描述
		AUsersExtendEnum[] usersExtendEnums = AUsersExtendEnum.values();
		for (int i = 0; i < usersExtendEnums.length; i++)
		{
			AUsersExtendEnum usersExtendEnum = usersExtendEnums[i];
			if (usersExtendEnum.toString().startsWith("IDCARDTYPE_"))
			{
				// 表示是状态的标识
				if (usersExtendEnum.getStatus() == this.getIdCardType())
				{
					this.idCardTypeStr = usersExtendEnum.getName();
					break;
				}
			}
		}
		return idCardTypeStr;
	}

	public int getId()
	{
		return id;
	}

	public void setId(int id)
	{
		this.id = id;
	}

	public int getUsersId()
	{
		return usersId;
	}

	public void setUsersId(int usersId)
	{
		this.usersId = usersId;
	}

	public byte getIdCardType()
	{
		return idCardType;
	}

	public void setIdCardType(byte idCardType)
	{
		this.idCardType = idCardType;
	}

	public String getIdCardHeadImg()
	{
		return idCardHeadImg;
	}

	public void setIdCardHeadImg(String idCardHeadImg)
	{
		this.idCardHeadImg = idCardHeadImg;
	}

	public String getIdCardBackImg()
	{
		return idCardBackImg;
	}

	public void setIdCardBackImg(String idCardBackImg)
	{
		this.idCardBackImg = idCardBackImg;
	}

	public String getSendEmailCode()
	{
		return sendEmailCode;
	}

	public void setSendEmailCode(String sendEmailCode)
	{
		this.sendEmailCode = sendEmailCode;
	}

	public Date getSendEmailTime()
	{
		return sendEmailTime;
	}

	public void setSendEmailTime(Date sendEmailTime)
	{
		this.sendEmailTime = sendEmailTime;
	}

	public String getSendPhoneCode()
	{
		return sendPhoneCode;
	}

	public void setSendPhoneCode(String sendPhoneCode)
	{
		this.sendPhoneCode = sendPhoneCode;
	}

	public Date getSendPhoneTime()
	{
		return sendPhoneTime;
	}

	public void setSendPhoneTime(Date sendPhoneTime)
	{
		this.sendPhoneTime = sendPhoneTime;
	}

	public Date getCreateTime()
	{
		return createTime;
	}

	public void setCreateTime(Date createTime)
	{
		this.createTime = createTime;
	}

	public Date getUpdateTime()
	{
		return updateTime;
	}

	public void setUpdateTime(Date updateTime)
	{
		this.updateTime = updateTime;
	}

}
